﻿/*
* 作者:haojielyb
* 邮箱:haojielyb@qq.com
*/

using System.Collections.Generic;

namespace MqttModel
{
    public class AddErrInfoItem
    {
        /// <summary>
        ///
        /// </summary>
        public string customId { get; set; }

        /// <summary>
        ///
        /// </summary>
        public string errcode { get; set; }

        public override string ToString()
        {
            return $"\n {customId} 错误码 {errcode}";
        }
    }

    public class AddSucInfoItem
    {
        /// <summary>
        ///
        /// </summary>
        public string customId { get; set; }
    }

    public class AckInfo
    {
        /// <summary>
        ///
        /// </summary>
        public string facesluiceId { get; set; }

        /// <summary>
        ///
        /// </summary>
        public string AddErrNum { get; set; }

        /// <summary>
        ///
        /// </summary>
        public string AddSucNum { get; set; }

        /// <summary>
        ///
        /// </summary>
        public List<AddErrInfoItem> AddErrInfo { get; set; }

        /// <summary>
        ///
        /// </summary>
        public List<AddSucInfoItem> AddSucInfo { get; set; }

        /// <summary>
        ///
        /// </summary>
        public string result { get; set; }
    }

    public class Ack
    {
        /// <summary>
        ///
        /// </summary>
        public string messageId { get; set; }

        /// <summary>
        ///
        /// </summary>
        public string @operator { get; set; }

        /// <summary>
        ///
        /// </summary>
        public string code { get; set; }

        /// <summary>
        ///
        /// </summary>
        public AckInfo info { get; set; }
    }

    public class PushAck
    {

        public PushAck()
        {
            info = new Pushback { PushAckType = "2" };
        }
        /// <summary>
        ///
        /// </summary>
        public string messageId { get; set; }

        /// <summary>
        ///
        /// </summary>
        public string @operator { get; set; } = "PushAck";

        /// <summary>
        ///
        /// </summary>
        public string code { get; set; }

        /// <summary>
        ///
        /// </summary>
        public Pushback info { get; set; }
    }

    public class Pushback
    {
        /// <summary>
        /// 
        /// </summary>
        public string PushAckType { get; set; } = "2";
        /// <summary>
        /// 
        /// </summary>
        public string SnapOrRecordID { get; set; }
    }
}